@extends('admin.layout.main')

@section('content')
    <div class="breadcrumbs ace-save-state" id="breadcrumbs">
        <ul class="breadcrumb">
            <li>
                <i class="ace-icon fa fa-home home-icon"></i>
                <a href="#">版本管理</a>
            </li>
            <li class="active"><a href="#">编辑版本</a></li>
        </ul><!-- /.breadcrumb -->

        <div class="nav-search" id="nav-search">
            <form class="form-search">
		<span class="input-icon">
		<input type="text" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
			<i class="ace-icon fa fa-search nav-search-icon"></i>
		</span>
            </form>
        </div><!-- /.nav-search -->
    </div>

    <div class="row">
        <div class="col-xs-12">
        	<div class="clearfix">
				<div class="pull-right tableTools-container"></div>
			</div>
			<div class="table-header">
				<a href="#">
				<span class="menu-text orange"> 编辑版本 </span>
				</a>
			</div>
            <!-- PAGE CONTENT BEGINS -->
            <form class="form-horizontal" role="form" action="{{route('version.update',['id' => $data->getKey()])}}" method="post" enctype="multipart/form-data">
                <div>
                	{{csrf_field()}}
                	<input type="hidden" name="_method" value="put">
						<table id="dynamic-table" class="table table-striped table-bordered table-hover">
							<tbody>
								<tr>
									<td class="center">
										<span >* 操作系统  </span>
									</td>
									<td>
										<select name="type" style="width:200px;">
											<option value="android" @if($data->type=='android') selected @endif>Android</option>
											<option value="ios" @if($data->type=='ios') selected @endif>IOS</option>
										</select>
									</td>
								</tr>
								<tr>
									<td class="center">
										<span >* 版本号 </span>
									</td>
									<td>
										<input type="text" name="version" class="col-xs-10 col-sm-5" value="{{$data->version}}">
									</td>
								</tr>
								<tr>
									<td class="center">* 是否强制更新</td>
									<td>
										<input type="radio" name="is_force" value="1" 
										@if($data->is_force==1) checked @endif> NO
										<input type="radio" name="is_force" value="2" 
										@if($data->is_force==2) checked @endif> YES
									</td>
								</tr>
								<tr>
									<td class="center">* 文件上传</td>
									<td>
										<input type="file" name="path">
									</td>
								</tr>
								<tr>
									<td class="center">* 更新内容</td>
									<td>
										<textarea cols="60" rows="10" name="note">{{$data->note}}
										</textarea>
									</td>
								</tr>
								<tr>
									<td>
										<span></span>
									</td>
									<td>
										<button class="btn btn-info" type="submit">
				                            <i class="ace-icon fa fa-check bigger-110"></i>
				                            提交
				                        </button>
									</td>
								</tr>	
							</tbody>
						</table>
					</div>
            </form>
        </div>
    </div>
    </div><!-- /.main-content -->
@endsection

